<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page isELIgnored="false" %>
<html>
<body>
<div align="center">
    <table border="1" cellspacing="0">
        <caption>用户信息</caption>
        <tbody>
        <tr>
            <td>姓名</td>
            <td>性别</td>
            <td>年龄</td>
        </tr>
        <c:forEach items="${users}" var="user">
            <tr>
                <td>${user.name}</td>
                <td>${user.sex}</td>
                <td>${user.age}</td>
            </tr>
        </c:forEach>
        </tbody>
    </table>

    <p>一共${p.pages}页</p>
    <a href="info?page=${p.firstPage}">第一页</a>
    <a href="${pageContext.request.contextPath }/info?page=${p.nextPage}">下一页</a>
    <a href="${pageContext.request.contextPath }/info?page=${p.prePage}">上一页</a>
    <a href="${pageContext.request.contextPath }/info?page=${p.lastPage}">最后页</a>
</div>

</body>
</html>
